package com.hyj.controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


import com.hyj.entity.Statistics;
import com.hyj.service.StaService;



@Controller
public class StatisticsController {
	
	@Autowired
	StaService staService;
	@ResponseBody
	@RequestMapping("/getSta")
	public Object getSta(Statistics sta){
		List<Statistics> list = staService.getSta(sta);
		sta.setPage(null);
		sta.setLimit(null);

		System.out.println("查得到资源全部数据" + list);
		Map<String, Object> map = new HashMap<String, Object>();
		List<Statistics> list2 =staService.getSta(sta);
		map.put("code", 0);
		map.put("msg", "资源列表");
		map.put("count", list2.size()); 
		map.put("data", list);
		return map;
	}
	
	
}
